class <%= migration_class_name %> < <%= activerecord_migration_class %>
  def change
  <%- method_name = replace_view? ? 'replace_view' : 'update_view' -%>
  <%- if materialized? -%>
    <%= method_name %> <%= formatted_plural_name %>,
      version: <%= version %>,
      revert_to_version: <%= previous_version %>,
      materialized: <%= materialized_view_update_options %>
  <%- else -%>
    <%= method_name %> <%= formatted_plural_name %>, version: <%= version %>, revert_to_version: <%= previous_version %>
  <%- end -%>
  end
end
